/**
 *  @author phi
 */

#pragma once

#include "types.h"
#include "singleton-holder.hpp"

namespace tmlib {

    class AppManager
    {
    public :
        static AppManager* GetInstance() { return s_appManager; }

    public :
        virtual void initialize(int argc, char** argv)  = 0;
        virtual void finalize()                         = 0;
        virtual void run()                              = 0;
        virtual void update()                           = 0;
        virtual void draw()                             = 0;

    protected :
        AppManager()  { s_appManager=this; }
        virtual ~AppManager() { s_appManager=NULL; }

    private :
        static AppManager* s_appManager;
    };

}


extern int TMMain(int argc, char** argv);
